<cfcomponent output="false">
	
	<!--- --->
	
	<cffunction name="getStates" access="public" output="false" returntype="query">
		<cfargument name="name" required="false" default="" />
		
		<cfset var local = {} />
		
		<cfquery name="local.getStates" datasource="#$.site.getVar('datasource')#" cachedwithin="#createTimespan(0,1,0,0)#">
			select 
			hex(id) as id,
			abbrev as name 
			from state
			<cfif structKEyExists(arguments,"name") and arguments.name neq "">
				where name = '#arguments.name#'
			</cfif>
			order by name asc
		</cfquery>
		
		<cfreturn local.getStates />
		
	</cffunction>
	
	<!--- --->

</cfcomponent>